<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxusersStarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wxusers_stars', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('id_wxusers',false)->comment('wxusers主键');
            $table->integer('num',false)->default(1)->comment('本次增加爱心数量');
            $table->integer('wxuser_num_before',false)->dafault(0)->comment('增加前数量');
            $table->integer('wxuser_num_after',false)->default(1)->comment('增加后数量');
            $table->string('id_tradedetail',50)->nullable()->comment('订单号');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wxusers_stars');
    }
}
